import React, { useEffect } from 'react'
// import axios from 'axios';// instance.get('http://localhost')
import instance from '@/utils/request';

/**
 * 
 * 本地开发环境:
 *   http://localhost:4056/goods 
 *   http://localhost:4056/duanzi 
 * 
 * 正式环境
 *   http://api.xiaohigh.com/goods
 *   http://api.xiaohigh.com/duanzi
 * 
 */

export default function ProxyCom() {
  // console.log(process.env.REACT_APP_TEST)
  // console.log(process.env.REACT_APP_TEST2)
  //做案例时, 一定要把强哥的那个服务开起来
  useEffect(() => {
    //封装函数
    let getData = async () => {
      let goods = await instance.get('/goods');
      console.log(goods);
    }
    //调用函数
    getData()
  }, []);

  return (
    <div>3-ProxyCom</div>
  )
}
